package com.milo.thread.create;

/**
 * /**
 *
 * @author milo
 * @date 2019/4/2015:08
 * @description 实现Runnable接口创建多线程
 */
public class MyRunnable implements Runnable {

    private String name;

    public MyRunnable(String name) {
        this.name = name;
    }

    @Override
    public void run() {
        System.out.println(name + "执行了");
    }

    public static void main(String[] args) {
        MyRunnable runnable = new MyRunnable("线程2");
        Thread thread = new Thread(runnable);
        thread.start();
    }
}
